package com.review.Test.ThreadPool;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class MyScheduleThreadPool {

	public static void main(String[] args) {
		MyThread thread = new MyThread();
		
		ScheduledExecutorService pool = Executors.newScheduledThreadPool(1);
		
		pool.scheduleWithFixedDelay(thread, 5, 1, TimeUnit.SECONDS);
	}

}

class MyThread extends Thread{
	public void run(){
		System.out.println("run...");
	}
}
